/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package uimigration.widgetscorrepondances.impl;

import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.impl.EPackageImpl;

import uimigration.Interactions.InteractionsPackage;
import uimigration.Interactions.impl.InteractionsPackageImpl;
import uimigration.Plateform.PlateformPackage;
import uimigration.Plateform.impl.PlateformPackageImpl;
import uimigration.UIModel.UIModelPackage;
import uimigration.UIModel.impl.UIModelPackageImpl;
import uimigration.WidgetsModel.WidgetsModelPackage;
import uimigration.WidgetsModel.impl.WidgetsModelPackageImpl;
import uimigration.mappingmodel.MappingmodelPackage;
import uimigration.mappingmodel.impl.MappingmodelPackageImpl;
import uimigration.uipositionning.UipositionningPackage;
import uimigration.uipositionning.impl.UipositionningPackageImpl;
import uimigration.widgetscorrepondances.ChoiceModel;
import uimigration.widgetscorrepondances.Equivalents;
import uimigration.widgetscorrepondances.FUIElement;
import uimigration.widgetscorrepondances.WidgetscorrepondancesFactory;
import uimigration.widgetscorrepondances.WidgetscorrepondancesPackage;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model <b>Package</b>.
 * <!-- end-user-doc -->
 * @generated
 */
public class WidgetscorrepondancesPackageImpl extends EPackageImpl implements WidgetscorrepondancesPackage {
	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private EClass fuiElementEClass = null;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private EClass equivalentsEClass = null;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private EClass choiceModelEClass = null;

	/**
	 * Creates an instance of the model <b>Package</b>, registered with
	 * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
	 * package URI value.
	 * <p>Note: the correct way to create the package is via the static
	 * factory method {@link #init init()}, which also performs
	 * initialization of the package, or returns the registered package,
	 * if one already exists.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see org.eclipse.emf.ecore.EPackage.Registry
	 * @see uimigration.widgetscorrepondances.WidgetscorrepondancesPackage#eNS_URI
	 * @see #init()
	 * @generated
	 */
	private WidgetscorrepondancesPackageImpl() {
		super(eNS_URI, WidgetscorrepondancesFactory.eINSTANCE);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private static boolean isInited = false;

	/**
	 * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
	 * 
	 * <p>This method is used to initialize {@link WidgetscorrepondancesPackage#eINSTANCE} when that field is accessed.
	 * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #eNS_URI
	 * @see #createPackageContents()
	 * @see #initializePackageContents()
	 * @generated
	 */
	public static WidgetscorrepondancesPackage init() {
		if (isInited) return (WidgetscorrepondancesPackage)EPackage.Registry.INSTANCE.getEPackage(WidgetscorrepondancesPackage.eNS_URI);

		// Obtain or create and register package
		WidgetscorrepondancesPackageImpl theWidgetscorrepondancesPackage = (WidgetscorrepondancesPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof WidgetscorrepondancesPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new WidgetscorrepondancesPackageImpl());

		isInited = true;

		// Obtain or create and register interdependencies
		UIModelPackageImpl theUIModelPackage = (UIModelPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(UIModelPackage.eNS_URI) instanceof UIModelPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(UIModelPackage.eNS_URI) : UIModelPackage.eINSTANCE);
		WidgetsModelPackageImpl theWidgetsModelPackage = (WidgetsModelPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(WidgetsModelPackage.eNS_URI) instanceof WidgetsModelPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(WidgetsModelPackage.eNS_URI) : WidgetsModelPackage.eINSTANCE);
		InteractionsPackageImpl theInteractionsPackage = (InteractionsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(InteractionsPackage.eNS_URI) instanceof InteractionsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(InteractionsPackage.eNS_URI) : InteractionsPackage.eINSTANCE);
		UipositionningPackageImpl theUipositionningPackage = (UipositionningPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(UipositionningPackage.eNS_URI) instanceof UipositionningPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(UipositionningPackage.eNS_URI) : UipositionningPackage.eINSTANCE);
		PlateformPackageImpl thePlateformPackage = (PlateformPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(PlateformPackage.eNS_URI) instanceof PlateformPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(PlateformPackage.eNS_URI) : PlateformPackage.eINSTANCE);
		InteractionsPackageImpl theInteractionsPackage_1 = (InteractionsPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(InteractionsPackage.eNS_URI) instanceof InteractionsPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(InteractionsPackage.eNS_URI) : InteractionsPackage.eINSTANCE);
		MappingmodelPackageImpl theMappingmodelPackage = (MappingmodelPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(MappingmodelPackage.eNS_URI) instanceof MappingmodelPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(MappingmodelPackage.eNS_URI) : MappingmodelPackage.eINSTANCE);

		// Create package meta-data objects
		theWidgetscorrepondancesPackage.createPackageContents();
		theUIModelPackage.createPackageContents();
		theWidgetsModelPackage.createPackageContents();
		theInteractionsPackage.createPackageContents();
		theUipositionningPackage.createPackageContents();
		thePlateformPackage.createPackageContents();
		theInteractionsPackage_1.createPackageContents();
		theMappingmodelPackage.createPackageContents();

		// Initialize created meta-data
		theWidgetscorrepondancesPackage.initializePackageContents();
		theUIModelPackage.initializePackageContents();
		theWidgetsModelPackage.initializePackageContents();
		theInteractionsPackage.initializePackageContents();
		theUipositionningPackage.initializePackageContents();
		thePlateformPackage.initializePackageContents();
		theInteractionsPackage_1.initializePackageContents();
		theMappingmodelPackage.initializePackageContents();

		// Mark meta-data to indicate it can't be changed
		theWidgetscorrepondancesPackage.freeze();

  
		// Update the registry and return the package
		EPackage.Registry.INSTANCE.put(WidgetscorrepondancesPackage.eNS_URI, theWidgetscorrepondancesPackage);
		return theWidgetscorrepondancesPackage;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EClass getFUIElement() {
		return fuiElementEClass;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EAttribute getFUIElement_WidgetType() {
		return (EAttribute)fuiElementEClass.getEStructuralFeatures().get(0);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EAttribute getFUIElement_Name() {
		return (EAttribute)fuiElementEClass.getEStructuralFeatures().get(1);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EReference getFUIElement_Widgets() {
		return (EReference)fuiElementEClass.getEStructuralFeatures().get(2);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EReference getFUIElement_Uielement() {
		return (EReference)fuiElementEClass.getEStructuralFeatures().get(3);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EClass getEquivalents() {
		return equivalentsEClass;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EAttribute getEquivalents_Name() {
		return (EAttribute)equivalentsEClass.getEStructuralFeatures().get(0);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EAttribute getEquivalents_WidgetType() {
		return (EAttribute)equivalentsEClass.getEStructuralFeatures().get(1);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EReference getEquivalents_Uielement() {
		return (EReference)equivalentsEClass.getEStructuralFeatures().get(2);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EClass getChoiceModel() {
		return choiceModelEClass;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EAttribute getChoiceModel_Uimodel() {
		return (EAttribute)choiceModelEClass.getEStructuralFeatures().get(0);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EReference getChoiceModel_Uielements() {
		return (EReference)choiceModelEClass.getEStructuralFeatures().get(1);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public WidgetscorrepondancesFactory getWidgetscorrepondancesFactory() {
		return (WidgetscorrepondancesFactory)getEFactoryInstance();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private boolean isCreated = false;

	/**
	 * Creates the meta-model objects for the package.  This method is
	 * guarded to have no affect on any invocation but its first.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void createPackageContents() {
		if (isCreated) return;
		isCreated = true;

		// Create classes and their features
		fuiElementEClass = createEClass(FUI_ELEMENT);
		createEAttribute(fuiElementEClass, FUI_ELEMENT__WIDGET_TYPE);
		createEAttribute(fuiElementEClass, FUI_ELEMENT__NAME);
		createEReference(fuiElementEClass, FUI_ELEMENT__WIDGETS);
		createEReference(fuiElementEClass, FUI_ELEMENT__UIELEMENT);

		equivalentsEClass = createEClass(EQUIVALENTS);
		createEAttribute(equivalentsEClass, EQUIVALENTS__NAME);
		createEAttribute(equivalentsEClass, EQUIVALENTS__WIDGET_TYPE);
		createEReference(equivalentsEClass, EQUIVALENTS__UIELEMENT);

		choiceModelEClass = createEClass(CHOICE_MODEL);
		createEAttribute(choiceModelEClass, CHOICE_MODEL__UIMODEL);
		createEReference(choiceModelEClass, CHOICE_MODEL__UIELEMENTS);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private boolean isInitialized = false;

	/**
	 * Complete the initialization of the package and its meta-model.  This
	 * method is guarded to have no affect on any invocation but its first.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void initializePackageContents() {
		if (isInitialized) return;
		isInitialized = true;

		// Initialize package
		setName(eNAME);
		setNsPrefix(eNS_PREFIX);
		setNsURI(eNS_URI);

		// Obtain other dependent packages
		UIModelPackage theUIModelPackage = (UIModelPackage)EPackage.Registry.INSTANCE.getEPackage(UIModelPackage.eNS_URI);

		// Create type parameters

		// Set bounds for type parameters

		// Add supertypes to classes

		// Initialize classes and features; add operations and parameters
		initEClass(fuiElementEClass, FUIElement.class, "FUIElement", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
		initEAttribute(getFUIElement_WidgetType(), ecorePackage.getEString(), "widgetType", null, 0, 1, FUIElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEAttribute(getFUIElement_Name(), ecorePackage.getEString(), "name", null, 0, 1, FUIElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEReference(getFUIElement_Widgets(), this.getEquivalents(), null, "widgets", null, 0, -1, FUIElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEReference(getFUIElement_Uielement(), theUIModelPackage.getUIElement(), null, "uielement", null, 0, 1, FUIElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

		initEClass(equivalentsEClass, Equivalents.class, "Equivalents", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
		initEAttribute(getEquivalents_Name(), ecorePackage.getEString(), "name", null, 0, 1, Equivalents.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEAttribute(getEquivalents_WidgetType(), ecorePackage.getEString(), "widgetType", null, 0, 1, Equivalents.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEReference(getEquivalents_Uielement(), theUIModelPackage.getUIElement(), null, "uielement", null, 0, 1, Equivalents.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

		initEClass(choiceModelEClass, ChoiceModel.class, "ChoiceModel", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
		initEAttribute(getChoiceModel_Uimodel(), ecorePackage.getEString(), "uimodel", null, 0, 1, ChoiceModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEReference(getChoiceModel_Uielements(), this.getFUIElement(), null, "uielements", null, 0, -1, ChoiceModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

		// Create resource
		createResource(eNS_URI);
	}

} //WidgetscorrepondancesPackageImpl
